package com.dhl.flyweight;

/**
 * @title: Client
 * @Author danghailiang
 * @Date: 2022/8/16 12:08
 * @Version 1.0
 */
public class Client {
    public static void main(String[] args) {

        WebSiteFactory webSiteFactory = new WebSiteFactory();
        WebSite uniapp = webSiteFactory.getWebSiteCategory("uniapp");
        uniapp.use(new User("张三"));
        System.out.println(webSiteFactory.getWebSiteCount());


        WebSite web = webSiteFactory.getWebSiteCategory("web");
        web.use(new User("lisa"));
        System.out.println(webSiteFactory.getWebSiteCount());
    }
}
